<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录界面</title>
    <link rel="stylesheet" href="/javaWeb01/css/login.css">
    <script type="text/javascript" src="/javaWeb01/js/md5.js"></script>
    <script type="text/javascript" src="/javaWeb01/js/login.js"></script>

</head>
<body>
<div id="login">
    <div class="login">
        <div id="accountLogin">账号登录</div>
        <div id="telphoneLogin">手机号登录</div>
    </div>
    <div id="form">
        <div id="accountForm">
            <%--<%--%>
            <%--//设置10天免登录--%>
            <%--String account="";--%>
            <%--String pwd="";--%>
            <%--Cookie[] cookies = request.getCookies();--%>
            <%--if (cookies!=null&&cookies.length>0) {--%>
                <%--for (Cookie cookie : cookies) {--%>
                    <%--if (cookie.getName().equals("accountCookie")) {--%>
                        <%--account = cookie.getValue();--%>
                    <%--}--%>
                    <%--if (cookie.getName().equals("pwdCookie")){--%>
                        <%--pwd=cookie.getValue();--%>
                    <%--}--%>
                <%--}--%>
            <%--}--%>
            <%--%>--%>
<script>
                <%--<%--%>
                    <%--if (!("".equals(account))&&!("".equals(pwd))){--%>
                  <%--%>--%>
                <%--window.location.href="<%=request.getContextPath()%>/UserAccountLogin?account=<%=account%>&pwd=<%=pwd%>";--%>
                <%--<% }--%>
             <%--%>--%>
             <c:if test="${(!empty (cookie.accountCookie))&&(!empty (cookie.pwdCookie))}">
                  window.location.herf="${pageContext.request.contextPath}/UserAccountLogin?account=${cookie.accountCookie.value}&pwd=${cookie.pwdCookie.value}"
             </c:if>
</script>
            <!--账号登录-->
            <form action="<%=request.getContextPath()%>/UserAccountLogin" method="post" id="form1">
                 用户名: <input type="text" name="account" value="${cookie.accountCookie.value}" class="user pwd"placeholder="请输入账户">
                <br>
                 密码：  <input type="password" name="pwd" class="pwd" placeholder="请输入密码">
                <br>
                <br>     <input type="checkbox" name="mianLogin" > 免登录
                <br>
                <input type="button" value="登录" class="login1" id="btn1" >
                <a href="<%=request.getContextPath()%>/html/register.html"><input type="button" value="注册" class="login1"></a>

            </form>
        </div>
        <div id="telphoneForm">
            <!--手机号码登录-->
            <form action="<%=request.getContextPath()%>/UserPhoneLogin" method="post" id="form2">
                手机号码：<input type="text" name="phone" class="phone" placeholder="请输入手机号码">
                <br>
                验证码：  <input type="text" name="veriCode" class="code" placeholder="请输入验证码">
                            <input name="veriCode" type="button" id="btn2" value="获取验证码">
                <br>
               <input type="button" id="btn3" class="login1" value="登录">
                <a href="<%=request.getContextPath()%>1/html/register.html"><input type="button" value="注册" class="login1"></a>
            </form>
        </div>
    </div>
</div>
</body>
</html>